package tetris.game;
/**
 * Launch Activity
 * Select Start Game, Multiplayer or Exit.
 */


import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

public class MainActivity extends Activity {

	public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
    
    public void startGame(View v) {
    	Log.i("MucisTetris", "MucisTetrisActivity started");
    	Intent intent = new Intent(this, MucisTetrisActivity.class);
    	startActivityForResult(intent, 0);
    }
    
    public void multiplayerGame(View v) {
    	Log.i("MucisTetris", "MucisMultiplayerActivity started");
    	Intent intent = new Intent(this, MucisMultiplayerActivity.class);
    	startActivityForResult(intent, 1);
    }
    
    public void exit(View v) {
    	Log.i("MucisTetris", "MainActivity finished");
    	this.finish();
    }
    
    @Override
    protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    	if (resultCode == 0) Log.i("MucisTetris", "MucisTetrisActivity finished");
    	if (resultCode == 1) Log.i("MucisTetris", "MucisMultiplayerActivity finished");
    }

}
